#!/usr/bin/python2.5
# LEAVE THE FOLLOWING TWO LINES
# GAME BAKER
# yaml
# 0
s = """
!!python/object:game.Game
gameobjects:
  predator: &id001 !!python/object:game.GameObject
    baseworkstate: predator
    name: predator
    objtype: Gameobject
    requires: []
    sprite: null
    x: 500
    y: 300
  prey: &id002 !!python/object:game.GameObject
    baseworkstate: follow_mouse
    name: prey
    objtype: Gameobject
    requires: []
    sprite: null
    x: 0
    y: 0
gamescreens:
  None: !!python/object:game.GameScreen
    color: !!python/tuple [255, 255, 255]
    dimensions: !!python/tuple [800, 600]
    objtype: Gamescreen
    startobjects:
    - *id001
    - *id002
initcode: import pygame
objtype: Game
sprites: {}
startscreen: None
title: following
workstates:
  follow_mouse: !!python/object:game.WorkState
    actions: {1: 'self.vx=0

        self.vy=0', 3: 'x,y = pygame.mouse.get_pos()

        x = mouse.x

        y = mouse.y

        self.move_towards(x,y,speed=60)

        '}
    inherits: null
    objtype: Workstate
  predator: !!python/object:game.WorkState
    actions: {1: pass, 3: 'prey = gamescreen.gameobjects["prey"]

        self.move_to_intercept(target=prey,speed=50)'}
    inherits: null
    objtype: Workstate

"""
if __name__ == "__main__":
  import gbfileio,sys,runtime
  game = gbfileio.loadgame(sys.argv[0])
  runtime.run_game(game)
